import {
	axios,axiosLogin
} from '@/service/request.js'
import {
	ref,
	reactive,
	computed,
	watch
} from 'vue'
export default (data) => {
	const list = ref([]) //gqge
	const details = ref({})
	const page = ref(1)
	const size = ref(10)

	const sumComputed = computed(() => {
		return list.value.map(item => {
			return item.status
		})
	})
	const getAsyncList = async (url, params) => {
		const __data = await axios(url, params)
		return __data
	}
	const getMyFlow = async (url, params) => {
		const __data = await axios(url, params)
		return __data
	}
	const getMyFlowMoney = async (url, params) => {
		const __data = await axios(url, params)
		return __data
	}

	const getAppVersionApi = async (url, params) => {
		const __data = await axiosLogin(url, params)
		return __data
	}
	const getGgApi = async (url, params) => {
		const __data = await axios(url, params)
		return __data
	}
	const getXxApi = async (url, params) => {
		const __data = await axios(url, params)
		return __data
	}
	return {
		list,
		details,
		page,
		size,
		sumComputed,
		getAsyncList,
		getMyFlow,
		getMyFlowMoney,
		getAppVersionApi,
		getGgApi,
		getXxApi
	}
}